//
//  BrokenBlock.h
//  StarBugs
//
//  Created by ?? ? on 1/5/12.
//  Copyright 2012 antisword@playorca.com. All rights reserved.
//

#ifndef __BROKENBLOCK_H__
#define __BROKENBLOCK_H__

#include "Object/ObjectSprite.h"

class BrokenBlock : public ObjectSprite
{
private:
    int hp;
    CCSprite *particleSprite[6];
    b2Body* particleBody[6];
    void _callBack();
    float scheduleTime;
    b2World* worldTmp;
public:
    ~BrokenBlock();
    BrokenBlock();
    virtual void setBody(b2World* _world);
    virtual void removeBody(b2World *_world);
    
    void addBody(int cnt, CCPoint p, b2World *_world);
    void crashBlock(b2World *_world);
    void doBlock(float dt);
    void setBodyAngle(bool isInv);
};

#endif//__BROKENBLOCK_H__